package com.ihd.ihardware.view.scooter.view;

import android.arch.lifecycle.AndroidViewModel;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;

import com.ihd.ihardware.R;
import com.ihd.ihardware.databinding.ActivityScBluetoothBinding;

import cn.wowjoy.commonlibrary.base.BaseActivity;

public class SCBluetoothActivity extends BaseActivity<ActivityScBluetoothBinding, AndroidViewModel> {

    @Override
    protected void init(Bundle savedInstanceState) {
        mImmersionBar.statusBarDarkFont(false).init();

        binding.mtitlebar.setLeftBack(this);
        binding.mtitlebar.setLeftImageResource(R.drawable.bike_nb_back);

        binding.cancelTV.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        binding.openTV.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Settings.ACTION_BLUETOOTH_SETTINGS);
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);
                finish();
            }
        });
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_sc_bluetooth;
    }

    @Override
    protected Class getViewModelClass() {
        return AndroidViewModel.class;
    }

}
